![]() ![]() ![]() ![]() ![]() |
Troubleshooting and Configuring the Windows NT/95 Registry
- 35 -Cloning Windows NT SystemsYou might be wondering what installing software and cloning systems has to do with the Registry. After all, most 32-bit application developers use Registry changes to control the application and its functions. If you were to simply copy the application's files to another system, it probably wouldn't work because the required corresponding Registry changes for the application's initialization and control would not have been implemented. Say you need to set up 15 new systems for new employees, each system identical, each containing 10 applications. Plus, imagine having to implement the necessary modifications to the Registry for the Explorer interface and security. Setting that up manually would be costly in terms of time and productivity. Allowing users to install NT and applications for you wastes their productive time and leads to installation errors. Cloning is the answer. Cloning Limitations and RequirementsThe goal of cloning is to create a system that duplicates another, with all its interface changes, tweaks, installed software, and options, and to do it with these caveats:
The best option is to take a currently setup system, get everything exactly as you would like it, and clone it (except for the SIDs discussed previously). Then you could use that procedure over and over to make your installation work more easily, faster, and error-free. What you want to achieve is shown in Figure 35.1. In the past, Computer Profile Setup was included with the Windows NT 3.51 Resource Kit. Unfortunately, even though it did a passable job, it had too many limitations, particularly in relation to long filenames and hardware differences. It was difficult to use, and didn't always create unique SIDs for the systems. The complexity and undependable results made it unusable for most organizations. Now, however, SYSDIFF.EXE is available to help you clone your system. Figure 35.1. A fully installed system. SYSDIFF.EXENT 4.0 Server offers a new deployment tool called SYSDIFF.EXE, which is designed to allow quick and easy system cloning. SYSDIFF.EXE does not install or help install the operating system--just all of the modifications, applications, and changes. It can help make the necessary interface changes and connections to the network and shares. It can also help install the application files and implement the necessary Registry changes associated with those files. SYSDIFF.EXE allows you to perform these tasks in two ways. You can combine the changes to the Registry with the binary files required to run the applications into one item called a difference file (it is the difference between the original system and the system after all modifications), then copy the difference file to the new system. That process is outlined in the section titled "Cloning Step by Step." An illustration of this method is shown in Figure 35.2. Alternatively, you can use the cloning tool to make only Registry changes, which will create an .INF file. You then copy the actual files another way, by performing a backup-and-restore or by recording the files on a CD-recordable drive, and copy them to the target system. That option is outlined in the section titled "An Alternative Procedure for Installing Files on the Target System." Figure 35.3 illustrates this type of installation. Whether you include all the actual programs and auxiliary files or not, when you decide to clone your system, the most critical part is the Registry. Figure 35.2. Easy installation with a difference file. Figure 35.3. Using separate application and .INF files for a clone installation.
SYSDIFF.EXE Parts and PiecesFor SYSDIFF.EXE to work correctly, several things are required, including
Figure 35.4. The difference file includes the Registry changes and the application files.
Cloning Step by StepFollow these steps for fast, error-free cloning of Windows NT systems:
Combining the Installation and Cloning ProcessesA great shortcut to increase performance when working with cloning is to combine the installation process and the cloning process into one command by using SYSDIFF.EXE. The entire process is controlled by the answer file created by SETUPMGR.EXE, as shown in Figure 35.15, for unattended installation. Using SETUPMGR.EXE to create a text file with all the answers you normally have to give during the Windows NT installation routine can be a great time-saver. Figure 35.15. The unattended answer file launches SYSDIFF.EXE to complete the installation.
Streamlining the SYSDIFF ProcessThe SYSDIFF process is controlled by the SYSDIFF.INF file included with SYSDIFF.EXE on the CD-ROM. By editing the SYSDIFF.INF file, you can make the cloning process smoother, faster, and more space-efficient. The SYSDIFF.INF file is basically an inclusion/exclusion file that determines what will or will not be reviewed. The file on the CD-ROM has nine sections: [Version] [ExcludeDrives] [ExcludeDirectoryTrees] [ExcludeSingleDirectories] [ExcludeFiles] [IncludeFilesInDir] [ExcludeRegistryKeys] [ExcludeRegistryTrees] [ExcludeRegistryValues] Entries in the SYSDIFF.INF file (as long as the file is in the same directory as SYSDIFF.EXE) will direct the cloning process. For example, if you chose to add the drive letter "E" to the [ExcludeDrives] section, it would not even look there for the snapshot or the difference file. That could save a lot of time in the process if there was nothing there to be used. Be very careful about removing any of the default entries in the SYSDIFF.INF file. Doing so may make the cloning process unsuccessful. An Alternative Procedure for Installing Files on the Target SystemThe difference file contains all the Registry changes, the .INI file
changes, and the actual files that are new since the first snapshot. One of the side
effects of using SYSDIFF.EXE and the difference file to install applications
is that files inherit the date of the installation instead of retaining their original
date when they are written to the hard drive, as shown in Figure 35.16.
To use this alternate procedure, perform steps 1 through 11 to create the difference file and prepare the target system for file installation. Instead of using the difference file to install the software, split the file between the .INF file (which will update Registry and .INI files) and the actual program and data files. Create an .INF FileTo create the .INF file, use the Start | Run function and type D:\Bin\SYSDIFF.EXE /inf d:\bin\after.img d:\bin2. D:\bin\after.img is the path and name of the difference file, and d:\bin2 is the location for the .INF file and the changes to the system. The .INF file is given the same name as the difference file, except that the .INF file has an .INF extension (in this case, AFTER.INF). The contents of the .INF file are readable in Notepad or in any other text editor or word processor, and are shown in Figure 35.17. Figure 35.17. Text listing of the .INF file. Use the .INF File to Change the RegistryMake changes to Registry and .INI files on the target system by adding the .INF file to the list of files to use at installation. SETUPMGR.EXE has an easy way of including it, as shown in Figure 35.18. Start SETUPMGR.EXE and choose Advanced Options. Select the Boot Files tab. Add the path and name of the file. When Windows NT is installed using the answer file, the Registry and .INI file changes are made automatically. Figure 35.18. Adding the .INF file to the answer file in SETUPMGR.EXE. Copy the Directories and Files to Complete the InstallationFor your convenience, the .INF file-creation procedure also copies all files included in the difference file into subdirectories (as shown in Figure 35.19). When the files are copied into the $OEM$ subdirectory, the date on the files changes to the current date. Using the files in the $OEM$ directory may compromise your security if you are using any date-stamping for your files. Even though the files have been copied into the $OEM$ directory, you don't need to include them in the installation process. Instead of copying and using the files in the $OEM$ directory, install NT with an answer file, then copy the originals with XCOPY.EXE, and the dates and times will be preserved. Figure 35.19. All files from the difference file are copied into directory structures for easy copying to the target system. Use the .INF File for Backup of Software Registry EntriesThe .INF file can also be used in the event of a Registry problem with an application. Normally, you would need to reinstall, then make the necessary changes to the menus, toolbars, and preferences. However, if you could have a list of every change the installation and modification made to the Registry and .INI files, it would save a tremendous amount of time. If you create a difference file after you install an application, you have the information you need. Create a loadable .INF file from the difference file. With that file, you can repair the Registry. If the application's Registry entries become corrupted, load the .INF file back into the system. Instead of reinstalling the current Windows NT, choose to do an update, including the .INF file in the Advanced Options | Boot Files section of SETUPMGR.EXE. The Registry will be updated with the .INF file information. Possible Error MessagesOf course, something could go wrong, and, unfortunately, there is very little documentation on this process. Here are some of the more common problems and their solutions. Computer Hangs During the SYSDIFF/APPLY OperationThis will usually happen because of a lack of disk space or there is a problem with the difference file (either corrupted, or a part of the application or data files is bad). Check for disk space on the target system (where the applications will go). If it is insufficient, you will have this problem. If there is plenty of disk space, try manually installing the difference file from the local system instead of across the network. If that doesn't work, re-create the difference file. Error Message: System Error 5When SYSDIFF.EXE attempts to enter restricted areas of the Registry, you may get this message. Edit the SYSDIFF.INF file to exclude sections of the Registry that are off limits. Error Message: Diff Failed (Error 2)This is a syntax error on the command line when the /DIFF option is used. Check the step-by-step instructions and try again. Error Message: Diff Failed (Error 32)Error 32 indicates an open file error. The files could be open because applications are in use, or the system has opened other applications.
Error Message: Access DeniedWhen you create one image in the installation location with the SYSDIFF /INF option, and then run the function again to add another difference file to it, you may get this error. The easiest way to get around the problem is to use the first image crated with
the SYSDIFF SummaryUse SYSDIFF.EXE to update the Registry during installation. It will greatly enhance your installation and cloning procedures, plus give you opportunities to create loadable .INF files for Registry repair. |
|